Data can evolve over time. Various methods and systems were developed for managing time evolving data. The following U.S. patent applications and U.S. patents, all being incorporated herein by reference, describe various methods for managing data: U.S. patent application publication serial number 2005/0066118 of Perry et al., and U.S. patent application publication serial number 2005/0193272 of Stager et al.; U.S. patent application publication serial number 2005/0066222 of Rowan et al., U.S. patent application publication serial number 2005/0076262 of Rowan et al., U.S. patent application publication serial number 2005/0065962 of Rowan et al.; U.S. patent application publication serial number 2005/0063374 of Rowan et al.; U.S. patent application publication serial number 2005/0076264 of Rowan et al.; U.S. patent application publication serial number 2005/0066225 of Rowan et al.; U.S. patent application publication serial number 2005/0076261 of Rowan et al.; U.S. patent application publication serial number 2005/0066118 of Perry et al., and U.S. patent application publication serial number 2005/0071379 of Kekre et al.
Management of time evolving data can include making copies of data at different point in time. A point-in-time copy can involve physically copying all the data from source volumes to target volumes so that the target volume has a copy of the data as of a point-in-time. A point-in-time copy (also referred to as version) can also be made by logically making a copy of the data and then only copying data over when necessary, in effect deferring the physical copying. This logical copy operation is performed to minimize the time during which the target and source volumes are inaccessible.
A number of direct access storage device (DASD) subsystems are capable of performing “instant virtual copy” operations, also referred to as “fast replicate functions.” Instant virtual copy operations work by modifying metadata such as relationship tables or pointers to treat a source data object as both the original and copy. In response to a host's copy request, the storage subsystem immediately reports creation of the copy without having made any physical copy of the data. Only a “virtual” copy has been created, and the absence of an additional physical copy is completely unknown to the host.
Later, when the storage system receives updates to the original or copy, the updates are stored separately and cross-referenced to the updated data object only. The initial benefit is that the instant virtual copy occurs almost instantaneously, completing much faster than a normal physical copy operation. This frees the host and storage subsystem to perform other tasks. The host or storage subsystem may even proceed to create an actual, physical copy of the original data object during background processing, or at another time.
One such instant virtual copy operation is known as a FlashCopy® operation (FlashCopy is a registered trademark of International Business Machines, Corp. or “IBM”). A FlashCopy® operation involves establishing a logical point-in-time relationship between source and target volumes on the same or different devices. The FlashCopy® operation guarantees that until a track in a FlashCopy® relationship has been hardened to its location on the target disk, the track resides on the source side.
A relationship table is used to maintain information on all existing FlashCopy® relationships in the subsystem. During the establish phase of a FlashCopy® relationship, one entry is recorded in the source and target relationship tables for the source and target that participate in the FlashCopy® being established. Each added entry maintains all the required information concerning the FlashCopy® relationship. Both entries for the relationship are removed from the relationship tables when all FlashCopy® tracks from the source extent have been physically copied to the target extents or when a withdraw command is received. In certain cases, even though all tracks have been copied from the source extent to the target extent, the relationship persists.
The target relationship table further includes a bitmap that identifies which tracks involved in the FlashCopy® relationship have not yet been copied over and are thus protected tracks. Each track in the target device is represented by one bit in the bitmap. The target bit is set when the corresponding track is established as a target track of a FlashCopy® relationship. The target bit is reset when the corresponding track has been copied from the source location and destaged to the target device due to writes on the source or the target device, or a background copy task.
As part of the establishment of the logical point-in-time relationship during the FlashCopy® operation, all tracks in the source cache that are included in the FlashCopy® relationship should be destaged to the physical source volume, e.g., source DASD. Further details of the FlashCopy® operations are described in U.S. Pat. No. 6,611,901 of Micka et al. and U.S. Pat. No. 7,000,145 of Werner, et al., which are incorporated herein by reference.
Once the logical relationship is established, hosts may then have immediate access to data on the source and target volumes, and the data may be copied as part of a background operation. A read to a track that is a target in a FlashCopy® relationship and not in cache triggers a stage intercept, which causes the source track corresponding to the requested target track to be staged to the target cache when the source track has not yet been copied over and before access is provided to the track from the target cache. This ensures that the target has the copy from the source that existed at the point-in-time of the FlashCopy® operation. Further, any destages to tracks on the source device that have not been copied over triggers a destage intercept, which causes the tracks on the source device to be copied to the target device.
Instant virtual copy techniques have been developed, at least in part, to quickly create a duplicate copy of data without interrupting or slowing foreground processes. Instant virtual copy techniques, such as a FlashCopy® operation, provide a point-in-time copy tool. Instant virtual copy techniques may be used for a variety of applications, including, for example, data backup, data migration, data mining, testing, etc. For example, an instant virtual copy technique may be used for the creation of a physical “backup” copy of the source data, to aid in disaster recovery.
In many applications there is a need to create and save multiple read-only snapshots of storage data. These snapshots represent versions of the storage data and each version should be accessed independently.
There is a need to provide efficient methods, systems and computer program products for managing data versions.